#ifndef _ELEMENTS_IMAGE_H_
# define _ELEMENTS_IMAGE_H_

# include "config.h"
# include <string>
# include <SDL/SDL.h>
# include "Elements\\AElement.h"
# include "Utils\\Rect.h"

NS_BEGIN(SDL)
	NS_BEGIN(ELEMENTS)

	class Image : public AElement
	{
	protected:
		std::string m_path;
		UTILS::Rect m_rect;

	public:
		Image(std::string const& _path);
		Image(Image const& _image);
		virtual ~Image();

		Image& operator=(Image const& _image);
		bool operator==(Image const& _image) const;
		bool operator!=(Image const& _image) const;

	public:
		virtual bool Draw(SDL_Surface* _screen);
		virtual void SetPosition(Sint16 _x = 0, Sint16 _y = 0);
		virtual void SetPosition(UTILS::Rect const& _position);
		virtual void Move(Sint16 _offsetX, Sint16 _offsetY);
		virtual void Move(UTILS::Rect const& _offset);

		std::string const& GetPath() const;
		UTILS::Rect const& GetRect() const;
		void SetRect(UTILS::Rect const& _rect);

	public:
		__declspec(property(get=GetPath, put=SetPath)) std::string path;
		__declspec(property(get=GetRect, put=SetRect)) UTILS::Rect rect;
	};

	NS_END(ELEMENTS)
NS_END(SDL)

#endif // _ELEMENTS_IMAGE_H_
